<div class="content-table">
<div class="content-table-title"><?=$this->title?></div>
<div class="form-edit-task">

<?php if($this->msg):?>
<div class="replace"><?=$this->msg?></div>
<?php endif;?>

<form action="/bk/add-admin-submit" method="post" name="form1" onsubmit="return submitform(this)">
<span>邮箱：</span><input type="text" placeholder="登录名/邮箱" name="admin_email" id="admin_email">  <font>*</font><br/><br/>
<span>姓名：</span><input type="text" placeholder="姓名" name="admin_name" id="admin_name">  <font>*</font><br/><br/><br/>
<span>初始密码：</span>123456<br/><br/>
<span>组：</span> <select name="admin_group_id" id="admin_group_id">
	<option value="">[选择]</option>
<?php foreach($this->groups as $pkey => $pval):?>
<option value="<?=$pkey?>"><?=$pval?></option>
<?php endforeach;?>
</select>
 <font>*</font><br/>
<input type="submit" class="buttonlong" value="确认" />
<br /><br />
</form>
</div>
<br/><br/>
</div>

<script>
function submitform() 
{
	if( document.form1.admin_email.value.length == 0 )
	{
		alert("登录名/邮箱不能为空。");
		return false;
	}else if( document.form1.admin_name.value.length == 0 )
	{
		alert("姓名不能为空。");
		return false;
	}else if( document.form1.group_id.value.length == 0 )
	{
		alert("组不能为空。");
		return false;
	}
	
	form1.submit();
}
</script>